package com.koron.css2.contractmanage.Enum;


/**
 * 合同状态枚举
 *
 */
public enum ContractStatusEnum {

    CONTRACT_STATUS_0("0", "未签署"),
    CONTRACT_STATUS_1("1", "进行中"),
    CONTRACT_STATUS_2("2", "签约完成"),
    CONTRACT_STATUS_3("3", "签约失败"),
    CONTRACT_STATUS_5("5", "归档完成"),
    CONTRACT_STATUS_6("6", "作废"),
    CONTRACT_STATUS_7("7", "已上传合同附件");

    /**
     * 合同状态
     */
    private String contractStatus;

    /**
     * 合同状态名称
     */
    private String contractStatusName;

    ContractStatusEnum(String contractStatus, String contractStatusName) {
        this.contractStatus = contractStatus;
        this.contractStatusName = contractStatusName;
    }

    public String getContractStatus() {
        return contractStatus;
    }

    public void setContractStatus(String contractStatus) {
        this.contractStatus = contractStatus;
    }

    public String getContractStatusName() {
        return contractStatusName;
    }

    public void setContractStatusName(String contractStatusName) {
        this.contractStatusName = contractStatusName;
    }

    public static String getContractStatusName(String contractStatus) {
        ContractStatusEnum[] contractStatusEnums = values();
        for (ContractStatusEnum contractStatusEnum : contractStatusEnums) {
            if (contractStatusEnum.getContractStatus().equals(contractStatus)) {
                return contractStatusEnum.getContractStatusName();
            }
        }
        return null;
    }
}
